package com.example.airole.tts.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * TTS配置
 * 只支持百度AI语音合成
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "airole.tts")
public class TTSConfig {
    
    /**
     * 是否启用TTS服务
     */
    private boolean enabled = true;
    
    /**
     * TTS服务提供商 (只支持baidu)
     */
    private String provider = "baidu";
    
    /**
     * 百度配置
     */
    private BaiduConfig baidu = new BaiduConfig();
    
    /**
     * 默认语言
     */
    private String defaultLanguage = "zh-CN";
    
    /**
     * 支持的语言列表
     */
    private String[] supportedLanguages = {"zh-CN", "en-US"};
    
    /**
     * 最大文本长度
     */
    private int maxTextLength = 4000;
    
    /**
     * 音频输出目录
     */
    private String outputDirectory = "./audio/tts";
    
    /**
     * 音频文件保留时间(小时)
     */
    private int fileRetentionHours = 24;
    
    @Data
    public static class BaiduConfig {
        private String appId;
        private String apiKey;
        private String secretKey;
        private String voice = "0";
        private String language = "zh";
        private String speed = "5";
        private String pitch = "5";
        private String volume = "5";
        private String person = "0";
    }
}

